package wiBase.baseInterface;

import java.util.ArrayList;
import wiBase.WiException;
import wiBase.WiObject;
import wiBase.baseObject.Node;

/**
 * This interface provider methods to parse trace file
 */
public interface OnAdapterListener {
	/**
	 * set path of trace file
	 */
	public void setTraceFile(String traceFile);
	/**
	 * get path of trace file
	 * @return path of trace file
	 */
	public String getFileTrace();
	/**
	 * get path of file configuration
	 * @return path of configuration file
	 */
	public String getFileConfig();
	/**
	 * @return arrayList of Nodes which retrieve from trace file
	 */
	public ArrayList<WiObject> getListNodes();
	/**
	 * @return arrayList of Packets which retrieve from trace file
	 */
	public ArrayList<WiObject> getListPackets();
	/**
	 * @return arrayList of Events which retrieve from trace file
	 */
	public ArrayList<WiObject> getListEvents();
	/**
	 * @return time to parse trace file. in MiniSeconds.
	 */
	public long getMilliTimeParse();
	/**
	 * @return sum of time parse trace file.
	 */
	public double getDurationSimulation();
	/**
	 * @return with 
	 */
	public double getWidth();
	/**
	 * @return duration simulation
	 */
	public double getLength();
	/**
	 * @return node have id
	 */
	public Node getNodeById(int id);
	/**
	 * start parse trace file
	 * @throws WiException
	 */
	public void parse() throws WiException;
	/**
	 * cancel parsing trace file.
	 * @throws WiException if have error parse or could not cancel.
	 */
	public void cancelParse() throws WiException;
	/**
	 * @return isParsed or not
	 */
	public boolean isParsed();
	/**
	 * @param path of file configuration
	 */
	public void setConfFile(String cfgFile);
}
